/* 
 * Copyright [2018] [Alex/libo(liboware@gmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.unirest.constant;

import com.hyts.unirest.base.ConstantKey;
import com.hyts.unirest.base.ConstantValue;
import com.hyts.unirest.constant.item.HeaderValue;
import com.hyts.unirest.constant.item.HeaderKey;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/** 
 * @author LiBo/Alex
 * @version V1.0 
 * 请求头header所需要的相关基本参数，后期可以直接补充
 * 此方案，防止出现类型或者字段书写错误
 */
@AllArgsConstructor
public enum Header{
    
    ACCEPT_JSON(HeaderKey.ACCEPT,HeaderValue.JSON),
    CONTENT_TYPE_JSON(HeaderKey.CONTENT_TYPE,HeaderValue.JSON),
    USER_AGENT(HeaderKey.USER_AGENT,HeaderValue.USER_AGENT),
    COOKIE(HeaderKey.COOKIE,HeaderValue.NULL);
    
    private ConstantKey<?> key;
    
    private ConstantValue<?> value;

    /**  
     * @name key's getter method
     * @param none
     * @return key
     */
    public String getKey() {
        return String.valueOf(key.getKey());
    }

    /**  
     * @name value's getter method
     * @param none
     * @return value
     */
    public String getValue() {
        return String.valueOf(value.getValue());
    }
    
}
